package request

type Navigation struct {
	Name     string `form:"name" json:"name" binding:"required,max=20" label:"导航名称"`
	Url      string `form:"url" json:"url" binding:"required,max=200" label:"导航地址"`
	AssortID uint   `form:"assort_id" json:"assort_id" binding:"required,number" label:"分类ID"`
	Icon     string `form:"icon" json:"icon" binding:"max=200" label:"图标"`
	Sort     uint8  `form:"sort" json:"sort" binding:"required,number" label:"排序"`
	Desc     string `form:"desc" json:"desc" binding:"max=200" label:"描述"`
}

func (CalendarAdd Navigation) GetMessages() ValidatorMessages {
	return ValidatorMessages{
		"required": ":label为必填",
		"number":   ":label格式不正确",
		"max":      ":label字数超出限制",
	}
}
